﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sunny.UI;

namespace socketForm
{
    public class SqlConfig
    {
        public static string sqlType, sqlAddress, sqlSelcet, sqlSqlSort;


        public static string accessSql = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=地址;User Id=用户名;Password=密码;";

        public static string sqlServiceSql = "Server=服务器地址;Database=数据库名称;Trusted_Connection=SSPI";

        public static string sqlNameServiceSql = "Server=服务器地址;Database=数据库名称;User Id=用户名;Password=密码;";

        public static string mySqlSql = "Server=服务器地址;User ID=用户名;Password=密码;port=端口;Database=数据库名称;CharSet=utf8;pooling=true;SslMode=None;";

        public static string sqlLitSql = "Data Source=数据库名称;Version=3;Pooling=False;Max Pool Size=100;";

        public static string oracleSql = "Data Source=数据库名称;User Id=用户名;Password=密码;";

        public static int stopTime = Math.Max(Convert.ToInt32(String.IsNullOrEmpty(ConfigurationManager.AppSettings["stopTime"]) ? "0" : ConfigurationManager.AppSettings["stopTime"]), 8 * 1000);

        public static String filePath = String.IsNullOrEmpty(ConfigurationManager.AppSettings["filePath"]) ? "C://log" : ConfigurationManager.AppSettings["filePath"];

        public static long dataSize = Math.Max(Convert.ToInt64(String.IsNullOrEmpty(ConfigurationManager.AppSettings["dataSize"]) ? "0" : ConfigurationManager.AppSettings["dataSize"]),20);

        public static string sqlConfigSection = "SQL";
        public static string sqlConfigType = "sqlType";
        public static string sqlConfigAddress = "sqlAddress";
        public static string sqlConfigSqlSort = "sqlSort";
        public static string sqlConfigSelect = "sqlSelect";

        public static string tcpConfigSection = "TCP";
        public static string tcpConfigIp = "IP";
        public static string tcpConfigPort = "Port";
    }
}
